package com.project.nimsen.weixin.bean;

import org.apache.commons.lang3.StringUtils;
import org.dom4j.Element;

/**
 * 接收的资源信息类
 * */
public class BaseResourceRMsg extends BaseRMsg {
	public String mediaId;//资源的id

	public String getMediaId() {
		return mediaId;
	}

	public void setMediaId(String mediaId) {
		this.mediaId = mediaId;
	}
	protected String info() {
		StringBuffer info = new StringBuffer(super.info());
		info.append("<MediaId><![CDATA[").append(this.getMediaId()).append("]]></MediaId>");
		return info.toString();
	}

	protected void fullchildProperty(Element root) {
		super.fullchildProperty(root);
		String sgid = root.elementText("MediaId");
		if(StringUtils.isNotBlank(sgid))
			this.setMediaId(sgid);
	}
}
